<?php
if(count($correlativo > 0)){
    ?>
    <table border='1' cellpadding='0' cellspacing='0' width='98%' align='center' style="border:5;">
        <tr height='30px' align='center'>
            <th width='200px'>Documento</th>
            <th >Correlativo-Secuencia</th>
            <th width='110px'>Aplica F. Libre</th>
            <th width='280px'>Forma Libre a Usar</th>
        </tr>
    <?php 
    foreach ($doc as $data) {
        $nom='numero_'.$data['Documento']['id'];
        $apl_for='aplica_'.$data['Documento']['id'];
        $ser='serial_'.$data['Documento']['id'];
        $div='div_'.$data['Documento']['id'];
        $c1=$data['Documento']['campo_bd'];
        $c2='ctl_'.$data['Documento']['campo_bd'];
    ?>
        <tr height='30px'>
            <td><?php echo $data['Documento']['nombre'].' ('.$data['Documento']['prefijo'].')';?></td>
            <td><?php echo $this->Interfaz->input($nom, 10, 'numerico', 'inputn', 0, 20, ($correlativo['Correlativo'][$c1]+1), 1, 1, 'NUMERO DONDE INICIA LA SECUENCIA DE CORRELATIVO PARA EL DOCUMENTO', '1'); ?></td>
            <td><?php 
                if($correlativo['Correlativo'][$c2]==1){
                    $va='SI';
                }
                else{
                    $va='NO';
                }
                echo '<span class="labeln">'.$va.'</span>';
                /*
            $options = array(1=>array(1 => 1),2=>array(0 => 0));?>
                <span class="labeln">Si:</span> <?php echo $this->Interfaz->radio($apl_for, $options[1], 0,array('onchange'=>"habilita('$div')"));?>
                <span class="labeln">No:</span> <?php echo $this->Interfaz->radio($apl_for, $options[2], 0,array('onchange'=>"habilita('$div')"));
                */?>
            </td>
            <td>
            <?php 
                if($correlativo['Correlativo'][$c2]==1){
                    echo $this->Interfaz->select($ser, 12, 'selectn', $listaSerial, '', 'Forma libre a ser Utilizada', 0, 1,array('style' => 'width: 130px'));
                }
            ?>
           </td>
        </tr>
    <?php
    }
    ?>
    </table>
    <?php
}
else{
    $this->Vista->mensaje('Para la Tienda No existe Correlativo Individual Creado','Puntos-Cajas');
}
?>

<br />
<?php
?>